package com.meirengu.webview.common;

/**
 * 筛选类型枚举类
 */
public enum ThirdBackEnum {

    SUCCESS("成功", 1),
    FAIL("失败", 2),
    SIGNATURE_ERROR("签名错误", 3),
    REPEAT("数据重复", 4),
    OTHER("其他原因", 5);

    // 成员变量
    private String name;
    private int value;

    // 构造方法
    private ThirdBackEnum(String name, int value) {
        this.name = name;
        this.value = value;
    }

    // 普通方法
    public static String getName(int value) {
        for (ThirdBackEnum c : ThirdBackEnum.values()) {
            if (c.getValue() == value) {
                return c.name;
            }
        }
        return null;
    }

    // get set 方法
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }


}
